<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <title>TODO supply a title</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
    </head>
    <body>
        <div>
            <h1><a href="<?php echo U('Home/News/create');?>">添加</a></h1>
            <table>
                <tr> 
                    <th>tilte</th>
                    <th>操作</th>
                </tr>
                <?php foreach($data as $key=>$value){?>
                <tr>
                    <td>
                        <a href="<?php echo U('Home/News/read');?>?id=<?php echo $value['id'];?>">
                        <?php echo $value['title']?>
                        </a>
                    </td>
                        
                    <td>
                        <a href="<?php echo U('Home/News/update')?>?id=<?php echo $value['id'];?>">更新</a>
                        <a href="<?php echo U('Home/News/delete')?>?id=<?php echo $value['id'];?>">删除</a>
                    </td>
                </tr> 
                <?php }?>
            </table>
            
        </div>
    </body>
</html>